# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=darts-clone
pkgver=0_git20181117
_gitrev=e40ce4627526985a7767444b6ed6893ab6ff8983
pkgrel=0
pkgdesc="C++ header library for a static double-array trie structure"
url="https://github.com/s-yata/darts-clone"
arch="all !s390x" # s390x: failed dictionary test
license="BSD-2-Clause"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev"
source="$pkgname-$_gitrev.tar.gz::https://github.com/s-yata/darts-clone/archive/$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr
	make
}

check() {
	cd "$builddir"/test
	./test-darts
	./test-tools.sh
}

package() {
	make DESTDIR="$pkgdir" install
}


sha512sums="
092cc833fff937365117f5b780f09a1ffdd25104ab57e36f7cba25a9a6bee289c105cae997a50b61b5b542c1c34d71bddf132d0ca14d563198b57caa9af2ac22  darts-clone-e40ce4627526985a7767444b6ed6893ab6ff8983.tar.gz
"
